var createCounter = function (n) {
    let temp = n
    return function () {
        return temp++
    };
};

const counter = createCounter(9)
console.log(counter())
console.log(counter())
console.log(counter())
console.log(counter())
